/*
Health & Armour By Deadstroke
*/

{$CLEO .cs}
thread 'Hea&Arm'

wait 0
18@ = 0     //Valor inicial de water hurt
25@ = 0     //Valor inicial de 'sound' em 'dying' 
gosub  @VALUES

//Loop geral do mod
while true
    wait 14@ 
    Player.Defined($PLAYER_CHAR)
    jf  continue
    
    //Setando valores iniciais       
    
    0006: 32@ = 0
    0006: 33@ = 0
    0006: 14@ = 0
    
    0AB1: call_scm_func @FIREPROOF 1 8@
    0AB1: call_scm_func @DEFINEHEALTH 4 1@ 4@ 6@ 30@ -> 15@ 13@ 31@
    0AB1: call_scm_func @DEFINEARMOUR 1 2@
        
    11@ = Actor.Health($PLAYER_ACTOR)
    04DD: 12@ = actor $PLAYER_ACTOR armour
       
    while true
        wait 14@
        
        //Resetar o fade    
        if and
            17@ == 5     //A cor do fade foi trocada?
            not fading      //J acabou o fade?
        then 
            0169: set_fade_color_RGB 0 0 0
            17@ = 1
        end
                              
        if  Player.Defined($PLAYER_CHAR)
        then
            //Salvando os valores de sade e colete anteriores
            0085: 9@ = 11@ // (int)
            0085: 10@ = 12@ // (int)             
            //Setando os valores de sade e colete atuais
            11@ = Actor.Health($PLAYER_ACTOR)
            04DD: 12@ = actor $PLAYER_ACTOR armour
            //Funes que dependem da perda de sade e colete ou que os alteram
            0AB1: call_scm_func @DYING 6 11@ 24@ 25@ 26@ 27@ 31@ -> 25@ 26@
            0AB1: call_scm_func @WATERHURT 3 18@ 19@ 28@ -> 18@ 19@ 28@ 11@                        
            if or 
                001D:   10@ > 12@
                001D:   9@ > 11@
            then
                0AB1: call_scm_func @AFFECTARMOUR 3 7@ 10@ 12@ -> 11@
                0AB1: call_scm_func @DAMAGE 6 17@ 9@ 10@ 11@ 12@ 29@ -> 17@
            end            
            //Outras funes            
            if  33@ > 7500
            then
                0AB1: call_scm_func @FIREPROOF 1 8@
                0AB1: call_scm_func @DEFINEHEALTH 4 1@ 4@ 6@ 30@ -> 15@ 13@ 31@
                0AB1: call_scm_func @DEFINEARMOUR 1 2@
                0006: 33@ = 0
            end            
            gosub   @RECUPERATION            
            //Verificar se vai recarregar o mod
            if and
                0039:   16@ == 1
                0ADC:   test_cheat "HEALARMOUR"
            then
                if and  //Verificar se est ao menos com um nvel mnimo de sade
                    002D:   11@ >= 15@
                    002D:   11@ >= 31@
                then
                    0ACD: show_text_highpriority "Health & Armour is reloaded." time 5000
                    gosub  @VALUES
                    break
                else    0ACD: show_text_highpriority "You need more health then of 'dying' and 'regeneration' state of to reload the script 'Health & Armour'." time 5000
                end
            end
        else
            0AB1: call_scm_func @WASTEDANDBUSTED 4 20@ 21@ 22@ 23@
            break
        end
        
    end
end

//Definindo resistncia ao fogo
:FIREPROOF
if  8039:   not 0@ == -1 
then
    0A8D: 1@ = read_memory 0xB7CEE6 size 1 virtual_protect 0        //Lendo o valor de se o player  a prova de fogo
    if  803B:   not 1@ == 0@  // (int)    
    then    055D: make_player $PLAYER_CHAR fireproof 0@
    end    
end
0AB2: ret 0 0

//0AB1: call_scm_func @DEFINEHEALTH 3 1@ 4@ 6@ -> 15@ 13@
//Entra: 1@ (0@): valor de 'maxhealth'; 4@ (1@): porcentagem mxima de sade de recuperao; 6@(2@): taxa de recuperao
//Sai: 15@ (15@): sade mxima a ser recuperada; 13@ (13@): tempo de loop no wait quando est se recuperando
:DEFINEHEALTH
if  8043:   not 0@ == -1.0
then
    //Definindo sade mxima  0xB793E0
    0A8D: 10@ = read_memory 0xB793E0 size 4 virtual_protect 0
    if  8045:   not 0@ == 10@ // (float)
    then    0A8C: write_memory 0xB793E0 size 4 value 0@ virtual_protect 0
    end    
    //Forar ao valor da sade no ser mair do que o mximo
    6@ = Actor.Health($PLAYER_ACTOR)
    0092: 5@ = float 0@ to_integer
    0017: 5@ /= 5.7
    if  001D:   6@ > 5@ // (int)
    then    Actor.Health($PLAYER_ACTOR) = 5@     
    end    
end
//Valor da sade total em pocentagem (570 = 100, pode ser mais que 100)
0653: 15@ = float_stat 24
006B: 15@ *= 1@ // (float)
0017: 15@ /= 570.0
0092: 15@ = float 15@ to_integer
//Tempo para dar loop no wait quando estiver se recuperando
0653: 12@ = float_stat 24
0017: 12@ /= 570.0
006B: 12@ *= 2@ // (float)
0006: 13@ = 1000
0093: 13@ = integer 13@ to_float
0073: 13@ /= 12@ // (float)
0092: 13@ = float 13@ to_integer
//Valor da sade total em pocentagem (570 = 100, pode ser mais que 100)
0653: 31@ = float_stat 24
006B: 31@ *= 3@ // (float)
0017: 31@ /= 570.0
0092: 31@ = float 31@ to_integer
//Fim da funo
0AB2: ret 3 15@ 13@ 31@

:DEFINEARMOUR
//Fixando valor de colete
0945: get_player $PLAYER_CHAR max_armour_to 1@
if and
    8039:   not 0@ == -1
    8045:   not 1@ == 0@
then
    04DD: 2@ = actor $PLAYER_ACTOR armour
    0A8F: 3@ = 0@ - 1@
    0A8F: 4@ = 2@ - 0@
    055F: set_player $PLAYER_CHAR max_armour += 3@
    035F: actor $PLAYER_ACTOR armour += 4@
end
0AB2: ret 0 0

//Definio de recuperao e regenerao
:RECUPERATION
if  0039:   3@ == 1     //Recuperao ativada?
then
    if and
        //Verificando parmetros I para recuperao
        001D:   15@ > 11@
        002D:   12@ >= 10@
        002D:   11@ >= 9@
    then
        //Verificando parmetros II para recuperao
        if  002D:   32@ >= 5@
        then            
            0085: 14@ = 13@ //Definio de taxa de regenerao
            //Regenerao
            11@ += 1
            Actor.Health($PLAYER_ACTOR) = 11@
        end
    else
        32@ = 0
        14@ = 0
    end
end
return

:AFFECTARMOUR
if  8043:   not 0@ == -1.0
then
    0062: 1@ -= 2@  // (int)
    0093: 1@ = integer 1@ to_float
    006B: 1@ *= 0@  // (float)
    0092: 1@ = float 1@ to_integer
    9@ = Actor.Health($PLAYER_ACTOR)
    0062: 9@ -= 1@  // (int)
    Actor.Health($PLAYER_ACTOR) = 9@    
end
9@ = Actor.Health($PLAYER_ACTOR)
0AB2: ret 1 9@

:DAMAGE
0062: 1@ -= 3@
0062: 2@ -= 4@
0A8E: 6@ = 1@ + 2@ 
if  0@ > 0
then
    0169: set_fade_color_RGB 255 0 0     
    7@ = 1000 
    0072: 7@ /= 6@ // (int) 
    043C: disable_sounds_after_fadeout 0 
    fade 0 7@ 
    wait 0 
    6@ *= 50 
    fade 1 6@
    6@ /= 50 
    043C: disable_sounds_after_fadeout 1
    0@ = 5      //Varivel que mostra que trocou a cor do fading
end
if  8039:  not 5@ == -1
then
    006A: 6@ *= 5@
    0016: 6@ /= 4
    Camera.Shake(6@)
end
0AB2: ret 1 0@

//0AB1: call_scm_func @DYING 6 11@ 24@ 25@ 26@ 27@ 31@ -> 25@ 26@
:DYING
0085: 31@ = 5@ // (int)
0016: 31@ /= 3
//Se estiver quas e morrendo: gamespeed
if  8043:   not 1@ == -1.0
then
    0A8D: 30@ = read_memory 0xB7CB64 size 4 virtual_protect 0        //Gamespeed atual
    if  001D: 31@ > 0@ 
    then
        //0AD1: show_formatted_text_highpriority "This is %.d opcode" time 2000 31@
        if  0043: 30@ == 1.0
        then    0A8C: write_memory 0xB7CB64 size 4 value 1@ virtual_protect 0
        end
    else
        if  0045: 30@ == 1@
        then    0A8C: write_memory 0xB7CB64 size 4 value 1.0 virtual_protect 0
        end   
    end   
end
//Se estiver quase morrendo: som
if  8039:   not 2@ == -1 
then
    if and
        001D:   5@ > 0@
        8118: not actor $PLAYER_ACTOR dead
        8741: not actor $PLAYER_ACTOR busted  
    then
        if  0039:   2@ == 1
        then
            Audiostream.PerformAction(3@, PLAY)
            Audiostream.Loop(3@, 1)
            2@ = 2
        end
        0093: 0@ = integer 0@ to_float
        0093: 31@ = integer 31@ to_float
        0085: 29@ = 31@
        0073: 29@ /= 0@
        0092: 0@ = float 0@ to_integer
        0092: 31@ = float 31@ to_integer
        if  29@ > 1.0
        then    0007: 29@ = 1.0
        end
        0ABC: set_audiostream 3@ volume 29@
    else
        Audiostream.PerformAction(3@, STOP)
        Audiostream.Loop(3@, 0)
        2@ = 1
    end
end
//Se estiver quase morrendo: efeito bbado  
if  8039:   not 4@ == -1
then
    //Pegando o offset de drunk visuals
    0A96: 27@ = actor $PLAYER_ACTOR struct
    000A: 27@ += 0x480  // offset para o pPlayerData
    0A8D: 28@ = read_memory 27@ size 4 virtual_protect 0
    000A: 28@ += 0x40  //Pegando o atual valor de "Drunk Visuals"
    0A8D: 27@ = read_memory 28@ size 1 virtual_protect 0   
    0085: 26@ = 4@
    0016: 26@ /= 3       //Efeito de menor intensidade
    0085: 25@ = 26@
    0012: 25@ *= 2       //Efeito de mdia intensidade
    if  001D:   5@ > 0@
    then
        0085: 31@ = 5@ // (int)
        0016: 31@ /= 3
        0012: 31@ *= 2
        if  001D:   31@ > 0@
        then
            0016: 31@ /= 2
            if  001D:   31@ > 0@
            then
                if or
                    0039:   27@ == 0
                    003B:   27@ == 25@
                    003B:   27@ == 26@
                then    Player.SetDrunkVisuals($PLAYER_CHAR, 4@)
                end
            else
                if or
                    0039:   27@ == 0
                    003B:   27@ == 4@
                    003B:   27@ == 26@
                then    Player.SetDrunkVisuals($PLAYER_CHAR, 25@)
                end
            end
        else
            if or
                0039:   27@ == 0
                003B:   27@ == 4@
                003B:   27@ == 25@
            then    Player.SetDrunkVisuals($PLAYER_CHAR, 26@)
            end
        end
    else
        if or
            003B:   27@ == 4@
            003B:   27@ == 25@
            003B:   27@ == 26@
        then    Player.SetDrunkVisuals($PLAYER_CHAR, 0)
        end
    end
end
0AB2: ret 2 2@ 3@

//0AB1: call_scm_func @WATERHURT 3 18@ 19@ 28@ -> 18@ 19@ 28@ 11@
//Entram: 18@ (valor do .ini de waterhurt; 19@ valor de perda de sade; 28@: (altura anterior)
//Sai: 0@: valor de waterhurt; 1@: valor de perda de vida; 2@: timer para verificar altura; 3@ ou 12@: altura atual do player; 8@: sade atual do player
:WATERHURT
if  8039:   not 0@ == -1
then
    if  0039:   0@ == 1
    then
        if or       //Comeou a cair?
            0818: actor $PLAYER_ACTOR in_air
            Actor.Animation($PLAYER_ACTOR) == "FALL_skyDive"
            Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_Accel"
            Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_L"
            Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_R"
            Actor.Animation($PLAYER_ACTOR) == "PARA_open"            
        then    //Caindo pra gua?
            Actor.StorePos($PLAYER_ACTOR, 10@, 11@, 12@)
            092E: get_water_height_at 10@ 11@ ignore_waves 0 store_to 13@
            02CE: 14@ = ground_z_at 10@ 11@ 12@
            0087: 2@ = 12@
            if and
                0025:   13@ > 14@
                84AD: not actor $PLAYER_ACTOR in_water  //Fix para o player no morrer instantaneamente na gua aps uma queda nela com perda de vida
            then
                0063: 2@ -= 6@
                2@ /= 1.5 
                0@ = 2
                008E: 1@ = float 2@ to_integer
            end
        end
    else
        if  0039:   0@ == 2
        then
            //Verificar se est em uma certa velocidade de queda
            Actor.StorePos($PLAYER_ACTOR, 10@, 11@, 12@)
            0063: 2@ -= 12@
            if  8021:   not 2@ > 0.35  
            then
                0@ = 1
                1@ = 0   
            else 
                //Verfiicar se caiu na gua
                if  04AD: actor $PLAYER_ACTOR in_water
                then
                    wait 10      //Espera para evitar bugs de animao de paraquedas (pois pode ocorrer se morrer desse modo o playe pode aparecer fazendo animao de paraquedismo)        
                    8@ = Actor.Health($PLAYER_ACTOR)
                    0063: 8@ -= 1@
                    Actor.Health($PLAYER_ACTOR) = 8@
                    0@ = 1
                    1@ = 0
                else
                    //Verificar se ainda est no ar
                    if and
                        8818:  not actor $PLAYER_ACTOR in_air
                        not Actor.Animation($PLAYER_ACTOR) == "FALL_skyDive"
                        not Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_Accel"
                        not Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_L"
                        not Actor.Animation($PLAYER_ACTOR) == "FALL_SkyDive_R"
                        not Actor.Animation($PLAYER_ACTOR) == "PARA_open"
                    then
                        0@ = 1
                        1@ = 0
                    end            
                end
            end            
        end    
    end
end
8@ = Actor.Health($PLAYER_ACTOR)        
0AB2: ret 4 0@ 1@ 12@ 8@ 

:WASTEDANDBUSTED
if  0117:   player $PLAYER_CHAR wasted
then
    if  8043:   not 0@ == -1.0
    then    015D: set_gamespeed 0@
    end
    if  8039:   not 1@ == -1
    then
        4@ = Audiostream.Load("cleo\cleo_audio\H&A\Wasted.mp3")
        Audiostream.PerformAction(4@, PLAY)    
    end
end
if  0741:   actor $PLAYER_ACTOR busted
then
    if  8043:   not 2@ == -1.0
    then    015D: set_gamespeed 2@
    end
    if  8039:   not 3@ == -1
    then
        4@ = Audiostream.Load("cleo\cleo_audio\H&A\Busted.mp3")
        Audiostream.PerformAction(4@, PLAY)    
    end
end
repeat
    wait 0
until   Player.Defined($PLAYER_CHAR)  
Audiostream.Release(4@)
0A8D: 6@ = read_memory 0xB7CB64 size 4 virtual_protect 0    //Gamespeed do jogo
if  0043:   not 6@ == 1.0
then    015D: set_gamespeed 1.0
end
0AB2: ret 0 0

:VALUES
//Verificando se o .ini existe
if  8AAB:   not file_exists "cleo\Health&Armour.ini"
then
    0ACD: show_text_highpriority "Unable to load ~b~'CLEO/Health&Armour.ini'" time 5000
    0A93: end_custom_thread
end

//Pegando o valor de ativao do mod
if  8AF0: 0@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Health&Armour" key "StartMod"
then
    0ACD: show_text_highpriority "You unabled to load the script: ~b~'Health & Armour'" time 5000
    0A93: end_custom_thread
end
if  8039:   not 0@ == 1
then
    0ACD: show_text_highpriority "You unabled to load the script: ~b~'Health & Armour'" time 5000
    0A93: end_custom_thread
end

//Verificar valor de recarregamento do mod
if  8AF0: 16@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Health&Armour" key "ReloadMod"
then 16@ = -1
end
if and
    8039:   not 16@ == 1
    8039:   not 16@ == -1
then    16@ = -1
end

//Setando os valores de 'SAMPHacking'
if  8AF0: 0@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Health&Armour" key "NoSampHacking"
then 0@ = 2
end
if and
    8039:   not 0@ == 2
    8039:   not 0@ == 1
    8039:   not 0@ == 0
then    0@ = 2
end
if  0@ > 0
then
    if 0AA2: 29@ = load_library "kernel32"
    then
        if 0AA4: 30@ = get_proc_address "GetModuleHandleA" library 29@
        then
            0AA7: call_function 30@ num_params 1 pop 0 "SAMP.dll" -> 30@
            if  30@ > 0
            then        //SAMP est ativado
                if  8039:   not 0@ == 2
                then    0@ = 3     
                else    0A93: end_custom_thread
                end
            end
        end
    end
end

//Pegando o valor de mxima sade
if  8AF2: 1@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "MaxHealth"
then 1@ = -1.0
end
if or
    8021:   not 1@ > 0.0
    0021:   1@ > 1450.0
    0039:   0@ == 3     //Est no SAMP?
then    1@ = -1.0
end

//Pegando o valor de mximo colete
if  8AF0: 2@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "MaxArmour"
then 2@ = -1
end
if or
    8019:   not 2@ > 0
    0019:   1@ > 150
    0039:   0@ == 3     //Est no SAMP?
then    2@ = -1
end 

//Pegando os valores de regenerao
if  8AF0: 3@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Regeneration" key "StartRegen"
then 3@ = -1
end
0AF2: 4@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Regeneration" key "MaxRegen"
0AF0: 5@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Regeneration" key "TimeRegen"
0AF2: 6@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Regeneration" key "RateRegen"
if or
    8039:   not 3@ == 1
    8031:   not 4@ >= 0.0
    0021:   4@ > 100.0
    8029:   not 5@ >= 0
    8031:   not 6@ >= 0.0
    0021:   6@ > 100.0
    0039:   0@ == 3     //Est no SAMP?
then    3@ = -1
end

//Pegando o valor de 'armouraffect'
if 8AF2: 7@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "AffectArmour"
then    0007: 7@ = -1.0
end
if or
    0031:   7@ >= 1.0
    8031:   not 7@ >= 0.0
    0039:   0@ == 3     //Est no SAMP?
then    7@ = -1.0
end

//Pegando o valor de 'fireproof'
if  8AF0: 8@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "Fireproof"
then 8@ = -1
end 
if  0039:   0@ == 3
then    8@ = -1
else
    if and
        0039:   0@ == 3     //Est no SAMP?
        8039:   not 8@ == 0
        8039:   not 8@ == 1
        8039:   not 8@ == -1
    then    8@ = -1
    end
end

//Pegando o valor de 'damagescreen'
if  8AF0: 17@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "DamageScreen"
then 17@ = -1
end
if and
    8039:   not 17@ == 1
    8039:   not 17@ == 5
    8039:   not 17@ == -1
then    17@ = -1
else
    if and
        fading
        0039: 17@ == 1
    then    17@ = 5
    end
end


//Pegando o valor 'DamageShake'
if  8AF0: 29@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "DamageShake"
then 29@ = -1
end 
if and
    not 29@ > 0
    29@ > 100
then    29@ = -1
end

//Pegando o valor de 'WaterHurt'
if  8AF0: 18@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "GeneralFunctions" key "WaterHurt"
then 18@ = -1
end
if  0039:   0@ == 3     //Est no SAMP?
then    18@ = -1
else
    if and
        8039:   not 18@ == 1
        8039:   not 18@ == 2
        8039:   not 18@ == -1
    then    18@ = -1
    end
end

//Pegando o valor 'Gamespeed' em 'Wasted'
if  8AF2: 20@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Wasted" key "SlowMotion"
then 20@ = -1.0
end 
if or
    0031:   20@ >= 1.0
    8021:   not 20@ > 0.0
    0039:   0@ == 3     //Est no SAMP?
then    0007: 20@ = -1.0
end

//Pegando o valor 'Sound' em 'Wasted'
if  8AF0: 21@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Wasted" key "Sound"
then 21@ = -1
end 
if and
    8039:   not 21@ == 1
    8039:   not 21@ == -1
then    21@ = -1
end
if and
    8AAB:   not file_exists "cleo\cleo_audio\H&A\Wasted.mp3"
    8039:   not 21@ == -1
then    21@ = -1
end

//Pegando o valor 'Gamespeed' em 'Busted'
if  8AF2: 22@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Busted" key "SlowMotion"
then 22@ = -1.0
end 
if or
    0031:   22@ >= 1.0
    8021:   not 22@ > 0.0
    0039:   0@ == 3     //Est no SAMP?
then    0007: 22@ = -1.0
end

//Pegando o valor 'Sound' em 'Busted'
if  8AF0: 23@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Busted" key "Sound"
then 23@ = -1
end 
if and
    8039:   not 23@ == 1
    8039:   not 23@ == -1
then    23@ = -1
end
if and
    8AAB:   not file_exists "cleo\cleo_audio\H&A\Busted.mp3"
    8039:   not 23@ == 1
then    23@ = -1
end

//Pegando o valor 'WhenIsDying' em 'Dying'
if  8AF2: 30@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Dying" key "WhenIsDying"
then 30@ = -1.0
end 
if or
    8021:   not 30@ > 0.0
    0021:   30@ > 100.0
then    0007: 30@ = -1.0
end

//Pegando o valor 'Gamespeed' em 'Dying'
if  8AF2: 24@ = get_float_from_ini_file "cleo\Health&Armour.ini" section "Dying" key "SlowMotion"
then 24@ = -1.0
end 
if or
    0031: 24@ >= 1.0
    8031: not 24@ >= 0.9
    0039: 0@ == 3     //Est no SAMP?
    0043: 30@ == -1.0
then    0007: 24@ = -1.0
end


//Pegando o valor 'Sound' em 'Dying'
if  0039:   25@ == 2
then    Audiostream.PerformAction(26@, STOP)
end  
if  8AF0: 25@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Dying" key "Sound"
then 25@ = -1
end 
if and
    8039: not 25@ == 1
    8039: not 25@ == -1
    0043: 30@ == -1.0
then    25@ = -1
end
if  8AAB:   not file_exists "cleo\cleo_audio\H&A\Dying.mp3"
then    25@ = -1 
else    26@ = audiostream.Load("cleo\cleo_audio\H&A\Dying.mp3")
end

//Pegando o valor 'DrunkEffect' em 'Dying'
if  8AF0: 27@ = get_int_from_ini_file "cleo\Health&Armour.ini" section "Dying" key "DrunkEffect"
then 27@ = -1
end 
if or
    not 27@ > 0
    27@ > 300
    0039: 0@ == 3     //Est no SAMP?
    0043: 30@ == -1.0
then    27@ = -1
end

return